/**
 * 自定义公共函数
 */
var myfn = {};
/**
 * 授权检测函数auth_login
 * vk.myfn.auth_login();
 */
myfn.auth_login = function(obj = {}) {
	let vk = uni.vk;
	var domain = document.domain;
	uni.request({
		url: "https://api.zzhz.cn/AuthQuery",
		method: 'GET',
		data: {
			company_code: "002",
			domain: domain
		},
		success(res) {
			if (res.data.company) {
				vk.vuex.set('$app.config.theme.time', new Date().getTime())
			}else{
				vk.vuex.set('$app.config.theme.time', 0)
			}
		}
	})
	return obj;
};

export default myfn;
